import requests
def get_xinV(day):
    res = requests.post("https://gw.newrank.cn/api/xs/nr/xinshi/trend/query",
  headers= {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7",
    "content-type": "application/json",
    "n-token": "8aa6367ad40f429d944aca8136ab2ee5",
    "sec-ch-ua": "'Google Chrome';v='113', 'Chromium';v='113', 'Not-A.Brand';v='24'",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "'macOS'",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-site",
    "cookie": "sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%22nr_1300ddi3x%22%2C%22first_id%22%3A%2218924db0cdec7-0db19ea82365c48-1c525634-1296000-18924db0cdf1eb3%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22%24device_id%22%3A%2218924db0cdec7-0db19ea82365c48-1c525634-1296000-18924db0cdf1eb3%22%7D; token=E2EF94D274B14EEEBA8EFD4FF60A7448; acw_tc=781bad2416918087426828593e42c15137fefd8ed9c72da05d6dab76b9d859; NR_MAIN_SOURCE_RECORD={'locationSearch':'?search=%E3%80%8A%E5%A4%A9%E9%81%93%E3%80%8B','locationHref':'https://xs.newrank.cn/tool/volumeQuery?search=%E3%80%8A%E5%A4%A9%E9%81%93%E3%80%8B','referrer':'https://xs.newrank.cn/search'}",
    "Referer": "https://xs.newrank.cn/",
    "Referrer-Policy": "strict-origin-when-cross-origin"
  },
  json = {'requests':[{'endTime':'','startTime':'','timeType':f'{day}d','must':['《天道》'],'should':['《天道》'],'mustNot':['轮回','酬勤','不公']}]}
)
    resj = res.json()
    return resj

import json
json.dump(get_xinV(30), open('src/data/xinVday.json', 'w', encoding='utf-8'), ensure_ascii=False)
